package com.ms.service.module.datacenterlite;

import java.io.Serializable;

import org.json.simple.JSONObject;

public class GameKeepSeatData implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 352579882718125690L;

	private String modeldbid;

	/**是否離線保留**/
	private boolean isofflinekeep;

	/**機台編號**/
	private int machineid;
	
	/**座位唯一碼**/
	private String seatid;
	
	/**遊戲名稱**/
	private String gameName;
	
	/**館別名**/
	private String halltype;
	
	/**超時時間**/
	private long timeout;
	
	/**機台狀態**/
	private int machinestat;
	
	/**server模組id**/
	private String moduleid;

	/**
	 * 將保留資料輸出成 joson 物件
	 * 
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public JSONObject toJson() {
		JSONObject obj = new JSONObject();
		obj.put("seatid", seatid);
		obj.put("game", gameName);
		obj.put("hall", halltype);
		obj.put("machineid", machineid);
		obj.put("timeout", timeout);
		obj.put("offlinekeep", (isofflinekeep) ? 1 : 0);
		obj.put("machinestat", machinestat);

		return obj;
	}

	public String getModuleid() {
		return moduleid;
	}

	public void setModuleid(String moduleid) {
		this.moduleid = moduleid;
	}

	public int getMachinestat() {
		return machinestat;
	}

	public void setMachinestat(int machinestat) {
		this.machinestat = machinestat;
	}

	public String getModeldbid() {
		return modeldbid;
	}

	public void setModeldbid(String modeldbid) {
		this.modeldbid = modeldbid;
	}
	
	public boolean isIsofflinekeep() {
		return isofflinekeep;
	}

	public void setIsofflinekeep(boolean isofflinekeep) {
		this.isofflinekeep = isofflinekeep;
	}

	public long getTimeout() {
		return timeout;
	}

	public void setTimeout(long timeout) {
		this.timeout = timeout;
	}
	public int getMachineid() {
		return machineid;
	}

	public void setMachineid(int machineid) {
		this.machineid = machineid;
	}

	public String getSeatid() {
		return seatid;
	}

	public void setSeatid(String seatid) {
		this.seatid = seatid;
	}


	public String getGameName() {
		return gameName;
	}

	public void setGameName(String gameName) {
		this.gameName = gameName;
	}

	public String getHalltype() {
		return halltype;
	}

	public void setHalltype(String halltype) {
		this.halltype = halltype;
	}
}
